﻿using BCAMap.AMap.Dto;
using BCCommon;
using BCCommon.Enums.TMS;
using BCDto.Common.ErrorMessage;
using BCService.MallInterface;
using BCTMSRESTful.Configs;
using BCTMSRESTful.Controllers.Management;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace BCTMSRESTful.Controllers.Management.TMS.RunForOther
{
    /// <summary>
    /// 跑腿接口
    /// </summary> 
    [ApiExplorerSettings(GroupName = "TMSAdmin")]
    [Route("api/v1/sim/[controller]")]
    public class RunForOtherController : ManagementBaseController
    {
        private IRunErrandService runForOtherService;

        public RunForOtherController(IRunErrandService runForOtherService)
        {
            this.runForOtherService = runForOtherService;
        }


        #region 电动车骑行接口测试 
        /// <summary>
        /// 电动车骑行接口测试
        /// </summary>
        /// <param name="lng1"></param>
        /// <param name="lat1"></param>
        /// <param name="lng2"></param>
        /// <param name="lat2"></param> 
        /// <returns></returns>
        [HttpGet("[action]")]
        [ProducesResponseType(typeof(DirectionResponseDto), 200)]
        public IActionResult GetDirection(double lng1, double lat1, double lng2, double lat2)
        {
            return Ok(runForOtherService.GetDirectionResponseDto(lng1, lat1, lng2, lat2));
        }
        #endregion


    }
}
